<!DOCTYPE html>
<html lang="{{=T.accepted_language or 'en'}}">
    <head>
        <title>{{=response.title or request.application}}</title>
        <meta charset="utf-8" />
        <!-- HTML5 Shiv - http://en.wikipedia.org/wiki/HTML5_Shiv //-->
        <!--[if lt IE 9]>script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
        <!-- http://dev.w3.org/html5/markup/meta.name.html -->
        <meta name="application-name" content="{{=request.application}}" />
        <!-- http://google.com/webmasters -->
        <meta name="google-site-verification" content="" />
        <!-- Mobile Viewport Fix
        j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
        device-width: Occupy full width of the screen in its current orientation
        initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
        user-scalable = yes allows the user to zoom in -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="shortcut icon" href="{{=URL('static','images/favicon.ico')}}" type="image/x-icon">
        <link rel="apple-touch-icon" href="{{=URL('static','images/favicon.png')}}">

        <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
        <script src="{{=URL('static','js/modernizr.custom.js')}}"></script>

        <!-- include stylesheets -->
        <!-- Google Fonts: Karla //-->
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,700' rel='stylesheet' type='text/css'>
        <!-- PyForum Logo //-->
        <link href='http://fonts.googleapis.com/css?family=Poiret+One' rel='stylesheet' type='text/css'>
        <!--
        <link href="{{=URL('static','css/bootstrap.min.css')}}" rel="stylesheet" type="text/css">
        <link href="{{=URL('static','css/bootstrap-responsive.min.css')}}" rel="stylesheet" type="text/css">
        //-->
        <link href="{{=URL('static','css/main.css')}}" rel="stylesheet" type="text/css">

        <!-- jQuery UI and Engine //-->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
        <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>

        <!-- PyForum's Own JS Controller, IIFE //-->
        <script src="{{=URL('static','js/pyforum.controller.js')}}"></script>

        <!--  TinyMCE //-->
        <!-- <script src="{{=URL('static','js/tinymce/js/tinymce/tinymce.min.js')}}"></script> //-->
        <!-- SCEditor //-->
        <script src="{{=URL('static', 'js/sceditor/minified/jquery.sceditor.xhtml.min.js')}}"></script>
        <link rel="stylesheet" href="{{=URL('static', 'js/sceditor/minified/themes/default.min.css')}}" />
    </head>

    <body>

        <!-- The body will consist of a header, a main area and a footer.
        The main area consists of a left and right sub-area, the left-sub-area
        is the main content area, and the right area contains the different
        "slots" (search, login, last posts, system announcements, admin links) //-->

        <header id="masthead">
            <div id="main-header-left">
                <a href="{{=URL(c='default',f='index')}}"
                   title="{{=T('Forum Home')}}"
                   class="nolink"><span class="logo">PyForum</span><br /><span class="logo-small">A Forum system based on Python and web2py</span></a>
            </div>
            <div id="main-header-right">
                {{=XML(forumhelper.get_system_property('zfsp_header_html', 'Welcome to pyForum'))}}
            </div>
        </header>

        <table class="main-container">
            <tbody>
                <tr>
                    <td id="main-content-left"><div class="pad">{{include}}</div></td>
                    <td id="main-content-right"><div class="pad">{{include 'pyforum_sidenav.html'}}</div></td>
                </tr>
            </tbody>
        </table>

        <footer id="site-footer">
            <div id="main-footer">PyForum 2.0.0 (Beta 20131229) | Desktop Site | Mobile Site | About</div>
        </footer>

        <!-- The javascript (Placed at the end of the document so the pages load faster) -->
        <!-- <script src="{{=URL('static','js/bootstrap.min.js')}}"></script> //-->
        <!--[if lt IE 7 ]>
            <script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
            <script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
        <![endif]-->

        {{if response.google_analytics_id:}}
            <script src="{{=URL('static','js/analytics.min.js')}}"></script>
            <script type="text/javascript">
                analytics.initialize({'Google Analytics':{trackingId:'{{=response.google_analytics_id}}'}});
            </script>
        {{pass}}

        <script src="{{=URL('static','js/share.js',vars=dict(static=URL('static','images')))}}"></script>
    </body>
</html>
